package com.ruoyi.job.task;

import cn.hutool.core.util.StrUtil;
import com.ruoyi.common.core.utils.LocalDateUtils;
import java.time.LocalDateTime;
import org.springframework.stereotype.Component;
import com.ruoyi.common.core.utils.StringUtils;

/**
 * 定时任务调度测试
 *
 * @author ruoyi
 */
@Component("ryTask")
public class RyTask {

  public void ryMultipleParams(String s, Boolean b, Long l, Double d, Integer i) {
    final String format = StringUtils.format(
        "执行多参方法： 字符串类型{}，布尔类型{}，长整型{}，浮点型{}，整形{}", s, b, l, d, i);
    System.out.println(StrUtil.format("{},{}", format,
        LocalDateUtils.dateTimeFormat(LocalDateTime.now())));
  }

  public void ryParams(String params) {
    System.out.println(StrUtil.format("执行有参方法：{},{}", params,
        LocalDateUtils.dateTimeFormat(LocalDateTime.now())));
  }

  public void ryNoParams() {
    System.out.println(StrUtil.format("执行无参方法{})",
        LocalDateUtils.dateTimeFormat(LocalDateTime.now())));
  }
}
